home *** CD-ROM | disk | FTP | other *** search
/ Gear Audio / Gear Audio CD-ROM.iso / csav / dos / network / install.dat < prev   
Encoding:
INSTALL Professional project  |  1999-01-31  |  14.8 KB  |  651 lines

  1. /*
  2.  *   Command AntiVirus Installation Program
  3.  *   Copyright (C) 1993,94,95 Command Software Systems
  4.  *
  5.  *   Edited by Command Software GC,SPB
  6.  *   Date      = June 13,1995
  7.  *   #Disk     = 1
  8.  */
  9. @DefineProject
  10.     @Name = "Command AntiVirus for DOS"
  11.     @Version = "4.54 SP1"
  12.     @OutDrive = C               // DRIVE
  13.     @SubDir = "\\F-PROT"        // DIRECTORY
  14. @EndProject
  15.  
  16. @DefineVars
  17.  
  18.     /*
  19.      * SILENT specifies no interaction, defaults are automatically used
  20.      * and no pauses are used. INTERACT allows the user to answer questions
  21.      * involving the installation
  22.      */
  23.     @QString @Mode          = "INTERACT"   // SILENT, INTERACT
  24.  
  25.     /* Specifies whether Command AntiVirus is to be installed or not, the indented
  26.      * section is the section that if YES is answered to this question, the
  27.      * following values will be taken into account, if NO then the
  28.      * following values will automatically be omitted */
  29.     @QString @FPInst        = "YES"     // YES,NO
  30.  
  31.        /* Specifies whether or not to load the DOS interface for the Command AntiVirus
  32.     * program */
  33.        @QString @FPDOS         = "YES"    // YES, NO
  34.  
  35.        /* Specifies whether or not to load Command AntiVirus from the AUTOEXEC.BAT */
  36.        @QString @FPAuto        = "YES"   // YES, NO
  37.  
  38.     /* Do you want to install the utilities */
  39.     @QString @UtilInst      = "YES"
  40.  
  41.        /* Do you want to install the Data Integrity Checker, CHECK */
  42.        @QString @UtilCheck     = "YES"
  43.  
  44.        /* Do you want to install the LOGIN.COM file so you can load TSR's
  45.     * ( VIRSTOP )from the system login script */
  46.        @QString @UtilLogin     = "NO"
  47.  
  48.        /* Do you want to install the software REBOOT program */
  49.     @QString @UtilReboot    = "YES"
  50.  
  51.        /* Do you wish to install the Command AntiVirus batch files */
  52.        @QString @UtilBatch     = "YES"
  53.  
  54.     /* Sets the FPDATA path including the FILENAME. Use skip as an
  55.      * option if you do not want this set command in your AUTOEXEC.BAT */
  56.     @QString @FPData        = "SKIP" // SKIP, [PATH,FILENAME]
  57.  
  58.     /* Settings for the Command AntiVirus placed in the AUTOEXEC.BAT file */
  59.     @QString @FPOptions     = "/HARD /TODAY" //FP manual pg.19
  60.  
  61.     /* This sets the modify your boot up files options: YES, Command AntiVirus goes
  62.      * ahead and changes your AUTOEXEC.BAT and CONFIG.SYS, NO, Command AntiVirus does
  63.      * not, SAVE Command AntiVirus saves the changes to a file with the extension NEW(
  64.      * AUTOEXEC.NEW, CONFIG.NEW ) for later.  */
  65.     @QString @ModifyBoot    = "YES"   // YES, NO, SAVE
  66.  
  67.     /* @BatSetup if set to true will place lines for the AUTOEXEC.BAT
  68.      * file above the last line in the AUTOEXEC.BAT file; if set to false
  69.      * it will place lines at the bottom of the AUTOEXEC.BAT file.*/
  70.     @Integer @Batsetup      = @TRUE
  71.  
  72.     @QString @Foreign       = "YES"
  73.     @QString @Core          = "NO"
  74.  
  75.     /* In house use, should not be touched */
  76.     @QString @ModAuto       = "NO"
  77.     @QString @GetWin        = " "
  78.     @QString @ZIPOPT        = ""
  79. @EndVars
  80.  
  81.  
  82.  
  83. // Main code section
  84. WELCOME:
  85.  
  86. // Check if the windir env. var. is being used
  87. @GetWin = @GetEnv "windir"
  88.  
  89. // If it is assume Windows is in Memory
  90. @If( @StrLen( @GetWin ) > 3 )
  91.    @Display
  92.       @CLS
  93.  
  94.     Installation of @Name onto platforms other than DOS is not supported.
  95.     If you have purchased the wrong product, please contact your software provider.
  96.  
  97.       @Pause
  98.    @EndDisplay
  99.    @Exit
  100. @Endif
  101.  
  102. // Check if the silent mode was used
  103. @If( @StrFind( @Mode, "SILENT")==0)
  104.  
  105.    // If so, skip interaction
  106.    @Goto Install
  107.  
  108. @Endif // Else continue with program
  109.  
  110.  
  111.    @Display
  112.       @Cls
  113.  
  114.               Command AntiVirus @Version
  115.  
  116.     Welcome to the @Name installation program!
  117.     This program will install @Name v@Version
  118.     on your computer. To continue this installation
  119.     press ENTER. To quit the install program at any time
  120.     press ESC.
  121.  
  122.       @PAUSE
  123.    @EndDisplay
  124.  
  125. // Main menu
  126. MAIN:
  127.  
  128.    // Display the main screen
  129.    @FlushGroups()
  130.    @GetGroups
  131.    @CLS
  132.            @Name v@Version Installation
  133.  
  134.    CSAV Directory ---- @OutDrive:@SubDir
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.    Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move the
  151.    bar to the desired menu selection and then press [Enter].
  152.  @Endif @Set i = "        INSTALL Command AntiVirus "
  153.       @Set d = "Customize Command AntiVirus Directory"
  154.       @Set f = "Customize Command AntiVirus DOS Options"
  155.       @Set u = "Customize Utility/Integrity Options"
  156.       @LocalWindow( 12, 36 )
  157.    @EndGroups
  158.    @if ('d' [= @Group)
  159.      @ClearGroup(d)
  160.      @Goto FPDir
  161.    @EndIf
  162.    @if ('f' [= @Group)
  163.      @ClearGroup(f)
  164.      @Goto FPROT
  165.    @EndIf
  166.    @if ('u' [= @Group)
  167.      @ClearGroup(u)
  168.      @Goto UTIL
  169.    @EndIf
  170.    @if('i' [= @Group)
  171.      @ClearGroup(i)
  172.      @Goto Install
  173.    @EndIf
  174. @Goto MAIN      // GO BACK TO MAIN MENU
  175.  
  176. FPDir:
  177.   @FlushGroups()
  178.   @GetGroups
  179.   @CLS
  180.   @MoveCStr( 1,2,30, "Command AntiVirus v@Version")
  181.   CSAV Drive       : @OutDrive
  182.   CSAV Directory   : @SubDir
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.    Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move the
  198.    bar to the desired menu selection and then press [Enter].
  199.   @Set m = "Return to Main Menu"
  200.   @Set f = "Command AntiVirus Drive"
  201.   @Set p = "Command AntiVirus Directory"
  202.   @LocalWindow( 12, 39 )
  203.   @EndGroups
  204.   @If ( 'f' [= @Group )
  205.      @ClearGroup(f)
  206.      @Goto FPDRIVE
  207.   @Endif
  208.   @If ( 'p' [= @Group )
  209.      @ClearGroup(p)
  210.      @Goto FPDirect
  211.   @Endif
  212.   @If ( 'm' [= @Group )
  213.      @ClearGroup(m)
  214.      @Goto Main
  215.   @Endif
  216. @Goto FPDir
  217.  
  218. FPDRIVE:
  219.   @GetOutDrive @OutDrive                      // get the output drive
  220.     @Suppress A                             // skip A
  221.     @Suppress B                             // skip B
  222.     @CLS
  223.     @MoveCStr( 1,2,30, "Command AntiVirus v@Version")
  224.     @MoveCStr( 2,2,11, "CSAV Drive       : @OutDrive")
  225.   CSAV Directory   : @SubDir
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.         Please select the drive to install @Name.
  240.  
  241.    Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move the
  242.    bar to the disk drive to install to and then press [Enter].
  243.       @LocalWindow( 10, 38 )
  244.       @EndOutDrive
  245.  
  246. @Goto FPDir
  247.  
  248. FPDirect:
  249.       @GetSubdir @SubDir
  250.      @CLS
  251.      @MoveCStr( 1,2,30, "Command AntiVirus v@Version")
  252.   CSAV Drive       : @OutDrive
  253.    @MoveCStr( 3,2,11, "CSAV Directory   : @SubDir")
  254.  
  255.  
  256.  
  257.  
  258.      @Default = "@SubDir"  // GET THE DIRECTORY
  259.      @Prompt = "Enter the name of the sub-directory for Command AntiVirus"
  260.       @EndSubdir
  261. @Goto FPDir
  262.  
  263.  
  264. FPROT:
  265.   @FlushGroups()
  266.   @GetGroups
  267.   @CLS
  268.   @MoveCStr( 1,3,30, "Command AntiVirus v@Version")
  269.    Command AntiVirus for DOS    : @FPDOS
  270.    Command AntiVirus in AUTOEXEC: @FPAUTO
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.    Press Enter when the selection is highlighted to toggle the selection
  283.    between YES and NO. The current setting of the item is located in the
  284.    upper left hand corner.
  285.  
  286.    Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move the
  287.    bar to the desired option and then press [Enter] to toggle YES or NO.
  288.   @Set m = "Return to Main Menu"
  289.   @Set f = "Command AntiVirus for DOS"
  290.   @Set w = "Command AntiVirus in AUTOEXEC"
  291.   @LocalWindow( 10, 39 )
  292.   @EndGroups
  293.   @If ( 'f' [= @Group )
  294.      @ClearGroup(f)
  295.      @If( @StrFind( @FPDOS, "YES")==0)
  296.     @FPDOS="NO"
  297.      @Else
  298.     @FPDOS = "YES"
  299.      @Endif
  300.      @Goto FPROT
  301.   @Endif
  302.   @If ( 'w' [= @Group )
  303.      @ClearGroup(w)
  304.      @If( @StrFind( @FPAUTO, "YES")==0)
  305.     @FPAUTO="NO"
  306.      @Else
  307.     @FPAUTO = "YES"
  308.     @Goto BatchSetup
  309.      @Endif
  310.      @Goto FPROT
  311.   @Endif
  312.   @If ( 'm' [= @Group )
  313.      @ClearGroup(m)
  314.      @Goto Main
  315.   @Endif
  316. @Goto FPROT
  317.  
  318. BatchSetup:
  319.       @FlushGroups()
  320.       @GetGroups
  321.       @CLS
  322.  
  323.        Does your computer boot to Microsoft Windows or a menu system?
  324.  
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.     If you answer "Yes" lines will be added just before the last line of
  337.     your AUTOEXEC.BAT. If you answer "No", then the lines will be added
  338.     at the end of your AUTOEXEC.BAT.
  339.  
  340.     Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move
  341.     the bar to the option you wish to choose and then press [Enter].
  342.            @LocalWindow(10,38)
  343.         @Set a = "Yes"
  344.         @Set b = "No"
  345.      @Endgroups
  346.      @If ('a' [= @Group)
  347.        @BatSetup = @True
  348.      @Else
  349.        @BatSetup = @False
  350.      @EndIf
  351. @Goto FPROT
  352.  
  353. UTIL:
  354.   @FlushGroups()
  355.   @GetGroups
  356.   @CLS
  357.   @MoveCStr( 1,3,30, "Command AntiVirus v@Version")
  358.    Integrity Checker : @UtilCheck
  359.    REBOOT.COM        : @UtilReboot
  360.    BATCH files       : @UtilBatch
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.    Press Enter when the selection is highlighted to toggle the selection
  371.    between YES and NO. The current setting of the item is located in the
  372.    upper left hand corner.
  373.  
  374.    Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move the
  375.    bar to the desired option and then press [Enter] to toggle YES or NO.
  376.   @Set m = "Return to Main Menu"
  377.   @Set f = "Integrity Checker"
  378.   @Set r = "REBOOT.COM"
  379.   @Set b = "BATCH Files"
  380.   @LocalWindow( 11, 39 )
  381.   @EndGroups
  382.   @If ( 'f' [= @Group )
  383.      @ClearGroup(f)
  384.      @If( @StrFind( @UtilCheck, "YES")==0)
  385.     @UtilCheck="NO"
  386.      @Else
  387.     @UtilCheck = "YES"
  388.      @Endif
  389.      @Goto UTIL
  390.   @Endif
  391.   @If ( 'b' [= @Group )
  392.      @ClearGroup(b)
  393.      @If( @StrFind( @UtilBatch, "YES")==0)
  394.     @UtilBatch="NO"
  395.      @Else
  396.     @UtilBatch="YES"
  397.      @Endif
  398.      @Goto UTIL
  399.   @Endif
  400.   @If ( 'r' [= @Group )
  401.      @ClearGroup(r)
  402.      @If( @StrFind( @UtilReboot, "YES")==0)
  403.     @UtilReboot="NO"
  404.      @Else
  405.     @UtilReboot = "YES"
  406.      @Endif
  407.      @Goto UTIL
  408.   @Endif
  409.   @If ( 'm' [= @Group )
  410.      @ClearGroup(m)
  411.      @Goto Main
  412.   @Endif
  413. @Goto UTIL
  414.  
  415. Install:
  416.  
  417. @If( @DiskFree(@OutDrive) < 2000k)
  418.    @GetGroups
  419.    @CLS
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.    @OutDrive drive does not have enough memory to install this program.
  435.  
  436.    Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move the
  437.    bar to the option you wish to choose and then press [Enter].
  438.       @LocalWindow( 10, 38)
  439.       @Set a = "Cancel Install"
  440.       @Set b = "Change Drive"
  441.    @EndGroups
  442.    @if ( 'a' [= @Group )
  443.       @Exit
  444.    @EndIf
  445.    @if ( 'b' [= @Group )
  446.       @Goto MAIN
  447.    @EndIf
  448. @Endif
  449.  
  450. @If(@StrFind( @Mode, "SILENT")!=0)
  451.    @If (@Exists "@OutDrive:\\@SubDir\\SIGN.DEF")
  452.     @FlushGroups()
  453.     @GetGroups
  454.     @CLS
  455.               Existing Version of Command AntiVirus found
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.     @Name appears to be installed in:
  466.     @MoveCStr(12,4,30,"@OutDrive:@SubDir")
  467.  
  468.     Select          @MoveCStr(14,11, 30, "Continue")if you are installing an update or have some
  469.     files you wish to re-install,                  @MoveCStr( 15, 34, 30, "Change Directory" )to make a new
  470.     directory to install Command AntiVirus, or        @MoveCStr( 16, 47, 30, "Cancel" )to quit the install.
  471.  
  472.     Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move
  473.     the bar to the option you wish to choose and then press [Enter].
  474.         @LocalWindow(7, 38)
  475.         @Set c = "Continue"
  476.         @Set d = "Change Directory"
  477.         @Set q = "Cancel Install"
  478.  
  479.     @EndGroups
  480.     @If ('c'[= @Group )
  481.     @Endif
  482.     @If ('d' [= @Group )
  483.        @Goto MAIN
  484.     @Endif
  485.     @If ( 'q' [= @Group )
  486.        @Exit
  487.     @EndIf
  488.    @Endif
  489. @Endif
  490.  
  491. FILEDO:
  492.  
  493. /* Write the files from Disk1 to Destination */
  494. Disk1:
  495.    @ChDrive @OutDrive
  496.    @MkDir("@OutDrive:\\@SubDir")
  497.  
  498.    @If( @StrFind( @UtilBatch,"YES")==0)
  499.       @DefineDisk
  500.      @Label = "Disk 1 of 1"
  501.      @File SE_SCAN.EXE
  502.       @EndDisk
  503.    @Endif
  504.  
  505.    @If( @StrFind( @UtilCheck, "YES")==0)
  506.      @DefineDisk
  507.        @Label = "Disk 1 of 1"
  508.        @File SE_CHCK.EXE
  509.      @EndDisk
  510.    @EndIf
  511.  
  512.    @If( @StrFind( @UtilReboot,"YES")==0)
  513.      @DefineDisk
  514.        @Label = "Disk 1 of 1"
  515.        @File REBOOT.COM
  516.      @EndDisk
  517.    @Endif
  518.  
  519.    @DefineDisk
  520.      @Label = "Disk 1 of 1"
  521.      @File COMEXIT.COM
  522.      @File FPUNZIP.BAT
  523.      @File FIND.EXE
  524.    @EndDisk
  525.  
  526.    @If( @StrFind( @FPDOS, "YES")==0)
  527.      @DefineDisk
  528.        @Label = "Disk 1 of 1"
  529.        @File README.TXT
  530.        @File VIR-HELP.ENG
  531.      @File Rescue.bat
  532.      @EndDisk
  533.    @Endif
  534.  
  535.    @If( @StrFind( @FPDOS, "YES")==0)
  536.      @DefineDisk
  537.        @Label = "Disk 1 of 1"
  538.        @File MACRO.DEF
  539.        @File FIXDISK.EXE
  540.        @File F-PROT.EXE
  541.        @File ENGLISH.TX1
  542.        @File ENGLISH.TX0
  543.       @File AUTOEXEC.FPT
  544.        @File SIGN.DEF
  545.      @EndDisk
  546.      @If( @StrFind( @Foreign, "YES") == 0)
  547.     @Copy("@StartupDrive:@StartupDir\\*.TX0","@OutDrive:@SubDir\\*.TX0")
  548.      @Endif
  549.    @Endif
  550.  
  551.    @If( @StrFind( @FPAuto,"YES" )==0 )
  552.     @If( @StrFind( @FPDOS, "YES")==0)
  553.       @FPAuto="AUTO"
  554.       @ModAuto="YES"
  555.     @Endif
  556.    @Endif
  557.  
  558. @If( @StrFind( @ModAuto,"YES")==0)
  559.    @If( @StrFind( @Mode, "SILENT")!=0)
  560.       @FlushGroups()
  561.       @GetGroups
  562.      @CLS
  563.                   AUTOEXEC.BAT Changes
  564.  
  565. @If( @StrFind( @FPAUTO, "AUTO")==0)   @OutDrive:@SubDir\F-PROT @FPOptions @Endif
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.    These are the changes to be made to the AUTOEXEC.BAT. One can have
  576.    INSTALL make the changes, have INSTALL save the changes to a file for
  577.    future consideration, or discard the changes needed to be made.
  578.  
  579.    Use the [Up Arrow], [Down Arrow], [Pg Up] and [Pg Dn] keys to move the
  580.    bar to the option you wish to choose and then press [Enter].
  581.     @LocalWindow( 9, 38) @Set a = "Make Changes to AUTOEXEC.BAT"
  582.      @Set b = "Save Changes to AUTOEXEC.FPT"
  583.      @Set c = "Discard Changes"
  584.       @EndGroups
  585.       @if ( 'a' [= @Group )
  586.      @ModifyBoot="YES"
  587.       @Endif
  588.       @if ( 'b' [= @Group )
  589.      @ModifyBoot="SAVE"
  590.       @Endif
  591.       @If ( 'c' [= @Group )
  592.      @ModifyBoot="NO"
  593.       @Endif
  594.    @Endif
  595.  
  596.    @If( @StrFind( @ModifyBoot,"NO")!=0)
  597.       @SetAutoexec
  598.      @If( @StrFind( @ModifyBoot, "YES")==0)
  599.         @Overwrite
  600.      @Else
  601.         @DiskProto
  602.      @Endif
  603.      @If(@BatSetup)
  604.         @AUTOINSERTNEXTTOLAST
  605.      @Else
  606.         @AUTOINSERTLAST
  607.      @Endif
  608.      @If ( @StrFind ( @FPDATA, "SKIP" ) != 0 )
  609.         @Verbatim "Set FP-Data=@FPDATA"
  610.      @EndIf
  611.      @If( @StrFind( @FPAUTO, "AUTO")==0)
  612.         @Verbatim "@OutDrive:@SubDir\\F-PROT @FPOptions"
  613.         @Path = "@OutDrive:@SubDir;"
  614.      @Endif
  615.       @EndAutoexec
  616.    @Endif
  617. @Endif
  618.  
  619. END:
  620. /* Conclusionary code */
  621. @Finish
  622.  
  623.    @If( @StrFind( @Core, "YES")==0)
  624.      @If( @StrFind( @Foreign, "YES") == 0)
  625.     @Copy("@StartupDrive:@StartupDir\\*.TX0","@OutDrive:@SubDir\\*.TX0")
  626.      @Endif
  627.    @Endif
  628.  
  629.    @CLS
  630.    @If( @StrFind( @Mode, "SILENT")!=0)
  631.       @CLS
  632.     Thank you for choosing Command Software Systems!
  633.  
  634.     Should @Name report a virus, please refer
  635.     to your documentation for instructions on how to proceed.
  636.  
  637.     Install will now decompress the Command AntiVirus files in the
  638.     destination directory.
  639.  
  640.     @Pause
  641.     @EndIf
  642.  
  643.     @ChDrive @OutDrive
  644.     @ChDir   "@SubDir"
  645.     @If( @StrFind( @ModifyBoot, "YES" )!=0)
  646.        @Execute("COMEXIT.COM NOREBOOT")
  647.     @Else
  648.        @Execute("COMEXIT.COM @ZIPOPT")
  649.     @Endif
  650.   @EndFinish
  651.